#!/usr/bin/env bash
# torque/sched_kill -- Kills a job specified by the user
# This is the specific command used by the Torque scheduler
##
set -euo pipefail

JOB_ID=$1
NUM_PROCESSES=$2

if [[ $NUM_PROCESSES -gt 1 ]]; then
  qdel ${JOB_ID}[]
else
  qdel $JOB_ID
fi
